package com.lzw.breezeNovel.webApp.mapper.Ai;

import com.lzw.breezeNovel.model.entity.pojo.Ai.AiVideo;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * @author 清风明月
 * @Package com.lzw.breezeNovel.webApp.mapper
 * @date 2025/3/20
 * @description
 */
@Mapper
@SuppressWarnings("all")
public interface AiVideoMapper {

    /**
     * 插入数据
     * @param aiVideo
     */
    void insert(AiVideo aiVideo);

    /**
     * 根据用户id查询数据
     * @param userId
     * @return
     */
    List<AiVideo> selectByUserId(Long userId);

    @Delete("delete from ai_video where id = #{id} and user_id = #{userId}")
    void deleteVideo(Long id, Long userId);
}
